package com.sais.manage.boot.building.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sais.manage.boot.building.dto.BuildingDTO;
import com.sais.manage.boot.building.dto.BuildingSaveDTO;
import com.sais.manage.boot.building.dto.BuildingSearchDTO;

import java.util.List;

/**
 * 宿舍管理系统-宿舍楼 service 接口
 *
 * @author zhang
 * @date 2019/11/30
 **/
public interface IBuildingService {

    /**
     * 宿舍楼 保存
     *
     * @param buildingSaveDTO
     * @return
     */
    boolean saveBuilding(BuildingSaveDTO buildingSaveDTO);

    /**
     * 宿舍楼 更新
     *
     * @param buildingSaveDTO
     * @return
     */
    boolean updateBuilding(BuildingSaveDTO buildingSaveDTO);

    /**
     * 宿舍楼 添加
     *
     * @param buildingSaveDTO
     * @return
     */
    boolean createBuilding(BuildingSaveDTO buildingSaveDTO);

    /**
     * 宿舍楼删除
     *
     * @param buildingId
     * @return
     */
    boolean deleteBuilding(String buildingId);

    /**
     * 宿舍楼查询
     *
     * @param buildingId
     * @return
     */
    BuildingDTO selectBuilding(String buildingId);

    /**
     * 宿舍楼 分页条件 查询
     *
     * @param current
     * @param size
     * @param buildingSearchDTO
     * @return
     */
    Page<BuildingDTO> listBuilding(Integer current, Integer size, BuildingSearchDTO buildingSearchDTO);

    /**
     * 宿舍楼 分配管理人员
     *
     * @param buildingId
     * @param userIds
     * @return
     */
    boolean bindBuildingUser(String buildingId, List<String> userIds);

    /**
     * 根据 宿舍楼id 用户id 删除 宿舍楼得管理员
     *
     * @param buildingId
     * @param userIds
     * @return
     */
    boolean unbindBuildingUser(String buildingId, List<String> userIds);

    /***
     * 根据性别查询 所有宿舍楼类型集合
     *
     * @param gender
     * @return
     */
    List<String> listBuildingType(Integer gender);

    /**
     * 查询当前用户管理的宿舍楼信息
     *
     * @param userId
     * @return
     */
    BuildingDTO selectBuildingByCurrentUserId(String userId);
}
